import fly from '@/common/fly';


/**
 * 获取 租赁单列表
 * @param params
 * @returns {*}
 */

export function tenancyList(page) {
    return fly.request({
        url: '/baoxiu/repaire/getAllRepaireByUid',
        method: 'GET',
        params: {
            ...page
        },
    })
}

export function getBuildingDel(buildType) {
    return fly.request({
        url: '/baoxiu/buildDetail/findAllByType',
        method: 'GET',
        params: {
            buildType
        },
    })
}
export function getGoods(buildType) {
    return fly.request({
        url: '/baoxiu/goods/findAllByType',
        method: 'GET',
        params: {
            buildType
        },
    })
}
export function getOrderDetail(rid) {
    return fly.request({
        url: '/baoxiu/repaire/getAllrepaireDetailById',
        method: 'GET',
        params: {
            rid
        },
    })
}
export function addRepaire(repaire) {
    return fly.request({
        url: '/baoxiu/repaire/add',
        method: 'POST',
        params: {...repaire}
    })
}
export function addEvaluate(rid,evaluate) {
    return fly.request({
        url: '/baoxiu/repaire/addEvaluate',
        method: 'POST',
        params: {
            rid,
          evaluate
        }
    })
}

export function findUserById() {
    return fly.request({
        url: '/Yang/User/findById',
        method: 'GET',
    })
}

export function update(user) {
    return fly.request({
        url: '/Yang/User/update',
        method: 'POST',
        params:{
            ...user
        }
    })
}

export function updatePassword(userForm) {
    return fly.request({
        url: '/Yang/User/updatePassword',
        method: 'POST',
        params:{
            ...userForm
        }
    })
}

export function forgetPwd() {
    return fly.request({
        url: '/sysUser/admin/resetpwd',
        method: 'Get',
        params:{

        }
    })
}

export function reg(u) {
    return fly.request({
        url: '/Yang/User/register',
        method: 'POST',
        params: {
            ...u
        }
    })
}

